package filter.v1;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2022/10/24.
 */
public class CriteriaMale implements Criteria {
    @Override
    public List<Person> meetCriteria(List<Person> persons) {
        List<Person> filtedPersons = new ArrayList<>();
        for (Person person : persons) {
            if (person.getGender().equalsIgnoreCase("MALE")) {
                filtedPersons.add(person);
            }
        }
        return filtedPersons;
    }
}
